package Entity;

import java.io.Serializable;
import javax.persistence.*;
import java.util.*;

@Entity
@Table (name = "Pedidos")
public class PedidoEntity implements Serializable{

	private static final long serialVersionUID = 1L;
	
	@Id
	@Column (name = "idPedido")
	private int id;
	
	@Column (name = "realizado")
	private boolean realizado;
	
	@ManyToOne
	@JoinColumn (name = "idMesaOcupacion")
	private MesaOcupacionEntity mesaOcupa;
	
	@OneToMany
	@JoinColumn (name = "idPedido")
	private List<PedidoEntity> pedidos = new ArrayList <PedidoEntity>();
	
	@ManyToOne
	@JoinColumn (name = "idSucursal")
	private SucursalEntity IdSucursal;
}
